
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel=stylesheet href='include/hoj.css' type='text/css'>
</head>
<body>
<center>
<div style="width:90%; text-align:left">
<img src="image/logo.png"/>
</div>
<table width=96%> 
	<tr align="center" class='hd' valign="top">
				<th><a href="faqs.php">F.A.Qs</a></th>
		<th><a href="./bbs.php">Web Board</a></th>
		<th><a href="./">Home</a></th>
		<th><a href="./problemset.html">ProblemSet</a></th>
		<th><a href="./status.php">Status</a></th>
		<th><a href="./ranklist.php">Ranklist</a></th>
		<th><a href="./contest.php">Contest</a></th>
		<th><a href=loginpage.php>Login</a></th><th><a href=registerpage.php>Register</a></th>	</tr>
</table>
</center>
<center>
<div class="notice">
	<div>
		<B>Notice:</B>鉴于种种原因，本OJ自下周星期一（3月5号）开始不再全面开放，请各位做好善后事宜，谢谢合作。	</div>
</div>
</center>
</div>
<title>Problem 2455. -- TopCoder MSRM 485 Deposit -- 衡阳八中OJ离线版-2012-02-29</title><center><h2>2455: TopCoder MSRM 485 Deposit</h2><span class=green>Time Limit: </span>5 Sec&nbsp;&nbsp;<span class=green>Memory Limit: </span>128 MB<br><span class=green>Submit: </span>6&nbsp;&nbsp;<span class=green>Solved: </span>4<br>[<a href='submitpage.php?id=2455'>Submit</a>][<a href='problemstatus.php?id=2455'>Status</a>][<a href='bbs.php?id=2455'>Discuss</a>]</center><h2>Description</h2><div class=content><p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; text-indent: 21pt"><span style="font-size: 10.5pt; font-family: '宋体'; position: relative; top: 3pt; mso-spacerun: 'yes'; mso-text-raise: -3.0000pt">从前，森林里有一只脑子进水的兔子。</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'; position: relative; top: 3pt; mso-spacerun: 'yes'; mso-text-raise: -3.0000pt"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; text-indent: 21pt"><span style="font-size: 10.5pt; font-family: 'Times New Roman'; position: relative; top: 3pt; mso-spacerun: 'yes'; mso-text-raise: -3.0000pt"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; text-indent: 21pt"><span style="font-size: 10.5pt; font-family: '宋体'; position: relative; top: 3pt; mso-spacerun: 'yes'; mso-text-raise: -3.0000pt">它平时搞<font face="Times New Roman">OI</font><font face="宋体">，做题做累了就开始在森林里探险。</font></span><span style="font-size: 10.5pt; font-family: 'Times New Roman'; position: relative; top: 3pt; mso-spacerun: 'yes'; mso-text-raise: -3.0000pt"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; text-indent: 21pt"><span style="font-size: 10.5pt; font-family: '宋体'; position: relative; top: 3pt; mso-spacerun: 'yes'; mso-text-raise: -3.0000pt">兔子的探险在森林里进行，森林可以视为一个凸多边形区域。森林中，有一块同样为凸多边形的宝地，种满了萝卜！！！</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'; position: relative; top: 3pt; mso-spacerun: 'yes'; mso-text-raise: -3.0000pt"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; text-indent: 21pt"><span style="font-size: 10.5pt; font-family: '宋体'; position: relative; top: 3pt; mso-spacerun: 'yes'; mso-text-raise: -3.0000pt">兔子的游戏很哲学，游戏过程是这样的，兔子从森林的边缘随机选一个起点，然后选择森林边缘上离起点最远的点做终点（如果有多个点，那么等概率选择其中一个），兔子会从起点开始，沿直线一路跑到终点，如果奔跑的过程中，它路过了萝卜地，那么兔子觉得这个起点是一个幸运点，否则，兔子认为这个起点是没有意义的。现在兔子想知道，它选到幸运点的概率是多少。</span><span style="font-size: 10.5pt; font-family: 'Times New Roman'; position: relative; top: 3pt; mso-spacerun: 'yes'; mso-text-raise: -3.0000pt"><o:p></o:p></span></p>
<!--EndFragment--></div><h2>Input</h2><div class=content><p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; margin-left: -26.25pt; text-indent: 26.25pt"><span style="font-size: 10.5pt; font-family: '宋体'; mso-spacerun: 'yes'">输入文件第一行包含两个整数<font face="Times New Roman">N</font><font face="宋体">和</font><font face="Times New Roman">M</font><font face="宋体">，表示森林边缘的点数和萝卜地边缘的点数。</font></span><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; margin-left: -26.25pt; text-indent: 26.25pt"><span style="font-size: 10.5pt; font-family: '宋体'; mso-spacerun: 'yes'">第二行和第三行，以逆时针顺序给出森林。第二行<font face="Times New Roman">N</font><font face="宋体">个整数，表示</font><font face="Times New Roman">N</font><font face="宋体">点的</font><font face="Times New Roman">x</font><font face="宋体">坐标，第三行给出</font><font face="Times New Roman">N</font><font face="宋体">个相应的</font><font face="Times New Roman">y</font><font face="宋体">坐标。</font></span><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; margin-left: -26.25pt; text-indent: 26.25pt"><span style="font-size: 10.5pt; font-family: '宋体'; mso-spacerun: 'yes'">第四行和第五行，以逆时针顺序给出萝卜地。第四行<font face="Times New Roman">M</font><font face="宋体">个整数，表示</font><font face="Times New Roman">M</font><font face="宋体">个点的</font><font face="Times New Roman">x</font><font face="宋体">坐标，第五行给出</font><font face="Times New Roman">M</font><font face="宋体">个相应的</font><font face="Times New Roman">y</font><font face="宋体">坐标。</font></span><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<!--EndFragment--></div><h2>Output</h2><div class=content><p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; text-indent: 21pt"><span style="font-size: 10.5pt; font-family: '宋体'; mso-spacerun: 'yes'">输出文件仅包含一个数，既兔子取到幸运点的概率，四舍五入保留<font face="Times New Roman">9</font><font face="宋体">位小数。</font></span><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<!--EndFragment--></div><h2>Sample Input</h2>
			<div class=content><span class=sampledata>4 4<br />
0 4 4 0<br />
0 0 4 4<br />
1 2 2 1<br />
1 1 2 2<br />
</span></div><h2>Sample Output</h2>
			<div class=content><span class=sampledata>0.666666667<br />
</span></div><h2>HINT</h2>
			<div class=content><p><p>&nbsp;对于100%的数据，有3 &le; N,M &le; 50。坐标绝对值不超过1000。</p></p></div><h2>Source</h2>
			<div class=content><p><a href='problemset.html?search=2011福建集训'>2011福建集训</a></p></div><center>[<a href='submitpage.php?id=2455'>Submit</a>][<a href='problemstatus.php?id=2455'>Status</a>][<a href='bbs.php?id=2455'>Discuss</a>]</center>﻿<br>

<a href="./"><span class=red>HOME</span></a>
<a href="javascript:history.go(-1)"><span class=red>Back</span></a>

<hr>
<center>
	<div class="footer">
			<a href=setlang.php?lang=ko>한국어</a>&nbsp;
		<a href=setlang.php?lang=cn>中文</a>&nbsp;
		<a href=setlang.php?lang=fa>فارسی</a>&nbsp;
		<a href=setlang.php?lang=en>English</a>&nbsp;
		<a href=setlang.php?lang=th>ไทย</a>
	<br>		<div>版权所有 &copy;2008-2012 WaterPark Organization. | <script src="http://s21.cnzz.com/stat.php?id=2982771&web_id=2982771" language="JavaScript"></script>
</div>
		<div>Based on opensource project <a href="http://hustoj.googlecode.com">hustoj</a>.</div>
	</div>
</center>
</body>
</html>
